define([ "PDUtilDir/grid", "PDUtilDir/searchBlock", "PDUtilDir/slidebar" ],
		function(Grid, SearchBlock, Slidebar) {

			function init(cache, addObj, updateObj, delObj, searchObj, playSupport) {
				SearchBlock.init('searchBlockId');
				// 初始化
				return Grid({
					id : "VideoGirdDivId",
					pageSize : 10,
					index : true,
					multi : true,
					pagination : true,
					cache : false,
					layout : [ {
						name : "视频名称",
//						field : "videoName",
						field : "videoName",
						sort : true,
						click : function(e) {
							updateObj.run(e.data.row);
						}
					}, {
						name : "产品名称",
						field : "productName",
						sort : true
					}, {
						name : "介绍",
						field : "videoIntroduce",
						width : "10%"
					}/*, {
						name : "部门",
						field : "deptName"
					}*/, {
						name : "创建人",
						field : "createUser"
					}, {
						name : "创建时间",
						field : "createTime"
					}, {
						name : "操作",
						field : "id",
						sort: false,
						click : function(e) {
							playSupport.run(e.data.row);
						},
						format : function(e) {
							return "播放";
						}
					} ],
					toolbar : [ {
						name : "上传",
						icon : "fa fa-plus-circle",
						callback : function(event) {
							addObj.run();
						}
					}, {
						name : "删除",
						icon : "fa fa-trash-o",
						callback : function(event) {
							delObj.run();
						}
					}, {
						name : "查询",
						icon : "fa fa-search",
						callback : function(event) {
							searchObj.run();
						}
					} ],
					data : {
						type : 'URL',
						value : getServer()
								+ '/flea/hclv/video/training/selectByDeptId.htmls'
					}
				});
			}
			return {
				init : init
			}
		});